/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.awt.Color;
import java.awt.image.BufferedImage;

/**
 *
 * @author Stupi
 */
public class DrawingImage {
    
    private BufferedImage image;

    
    //neka nam slika bude 250 sa 250 pixela, for petlja pravi da cela bude bela
    public DrawingImage() {
        image = new BufferedImage(250, 250, BufferedImage.TYPE_INT_ARGB);
        for (int i = 0; i < image.getWidth(); i++) {
            for (int j = 0; j < image.getHeight(); j++) {
                int white = 255;
                int alpha = new Color(image.getRGB(i, j)).getAlpha();
                int rgb = colorToRGB(alpha, white, white, white);
                image.setRGB(i, j, rgb);
            }
            
        }
    }
    
    public void drawBlackPoint (int x, int y) {
        
    }
    
    
    
    
    public int colorToRGB(int alpha, int red, int green, int blue) {

        int newPixel = 0;
        newPixel += alpha;
        newPixel = newPixel << 8;
        newPixel += red;
        newPixel = newPixel << 8;
        newPixel += green;
        newPixel = newPixel << 8;
        newPixel += blue;

        return newPixel;
    }
    
    
    
}
